﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Serialization;

namespace TestEngine.Script.Task
{
    [Serializable]
    public class GetOutputsTask: ScriptTask
    {

        #region Public Properties

        #endregion Public Properties


        protected override bool RunTaskSub(ScriptState state)
        {
            if (state.IsFailed) return false;
            Dictionary<String,String> values = new Dictionary<string, string>();
            foreach (KeyValuePair<string, string> output in state.Outputs)
            {
                values.Add(output.Key, state.Session.GetValueFromRange(output.Key));
            }
            state.Outputs = values;
            return true;
        }
    }
}
